<%@ Page Language="vb" AutoEventWireup="false" MasterPageFile="~/TGB.Master" CodeBehind="FrmFacturaVentaABM.aspx.vb" Inherits="TGB.FrmFacturaVentaABM" 
    title="Facturas de Venta" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:Panel ID="Panel4" runat="server" Height="13px" Style="width: 100%; background-color: #ccccff;
        text-align: center" Width="295px">
       <asp:LinkButton ID="LnkListadoFacturas" runat="server" Font-Names="Calibri" Font-Size="14px"
           Font-Underline="False" Style="letter-spacing: 3px; text-decoration: underline overline"
           TabIndex="3">Listado de Factruras</asp:LinkButton>
        /<asp:LinkButton ID="LinkNuevo"
               runat="server" Font-Names="Calibri" Font-Size="14px" Font-Underline="False" Style="letter-spacing: 3px;
               text-decoration: underline overline" TabIndex="3">Nueva Factura</asp:LinkButton></asp:Panel>
    <hr /> 
    <asp:Panel ID="Panel2" runat="server" Height="272px" Style="width: 100%; background-color: #efefef;
        text-align: center; height: 100%;" Width="125px">
        <asp:Panel ID="Panel3" runat="server" CssClass="campotxt" Height="17px" Style="width: 100%;
            text-align: right" Width="125px">
            <asp:Label ID="Label6" runat="server" CssClass="campotxt" Font-Bold="True" Text="Fecha :" BorderStyle="None"></asp:Label><asp:Label ID="LblFecha" runat="server" CssClass="campotxt" Font-Bold="True"
                    Text="DD/MM/AAAA" BorderStyle="None"></asp:Label>&nbsp;
                    </asp:Panel>
        <br />
        <table style="width: 471px">
            <tr>
                <td style="width: 72px; height: 19px; text-align: left" class="tabla">
                <asp:Label ID="LblCliente" runat="server" Font-Bold="True" Text="Cliente :"></asp:Label></td>
                <td style="width: 386px; height: 19px; text-align: left;">
                            <asp:DropDownList ID="CboClientes" runat="server" AppendDataBoundItems="True" CssClass="campotxt"
                                Width="100%" AutoPostBack="True">
                            </asp:DropDownList></td>
            </tr>
            <tr>
                <td class="tabla" style="width: 72px; height: 19px; text-align: left">
                </td>
                <td style="width: 386px; height: 19px; text-align: right">
                    <asp:Label ID="Label3" runat="server" CssClass="tabla" Font-Bold="True" Text="Numero de Factura :"></asp:Label>
                    <asp:Label ID="LblNumero" runat="server" CssClass="tabla" Font-Bold="True" Text="N-0001-"></asp:Label>
                    <asp:TextBox ID="TxtNumero" runat="server" CssClass="campotxt" Font-Bold="True" MaxLength="8"
                        Width="58px" ValidationGroup="Factura">88888888</asp:TextBox>
                    <asp:RangeValidator ID="RVNumeracion" runat="server" ControlToValidate="TxtNumero"
                        CssClass="campotxt" Display="Dynamic" ErrorMessage="RangeValidator" MaximumValue="99999999"
                        MinimumValue="00000001" Type="Integer" ValidationGroup="Factura">Error, Numero Incorrecto</asp:RangeValidator></td>
            </tr>
        </table>
        <asp:HiddenField ID="HfIdTalonario" runat="server" />
        <asp:Label ID="LblErrorTalonario" runat="server" Font-Bold="True" Font-Names="Calibri"
            Font-Overline="False" Font-Size="13px" Font-Strikeout="False" Font-Underline="False"
            ForeColor="Red" Style="text-align: center" Width="100%"></asp:Label><br />
                <asp:Label ID="Label4" runat="server" Text="Remitos a Facturar" Width="100%" style="font-weight: bold; font-size: 14px; vertical-align: middle; font-family: Calibri; background-color: #ff3333; text-align: center" Height="17px"></asp:Label>
        <table class="tabla" style="width: 623px">
            <tr>
                <td style="width: 63px; text-align: left; height: 20px;">
                            <asp:Label ID="Label1" runat="server" Font-Bold="True" Text="Remito :"></asp:Label></td>
                <td style="text-align: left; width: 474px; height: 20px;">
                <asp:DropDownList ID="CboRemitos" runat="server" CssClass="campotxt" Width="100%" TabIndex="7" AppendDataBoundItems="True">
                    <asp:ListItem Value="-1">Seleccione un Concepto</asp:ListItem>
                </asp:DropDownList></td>
                <td style="text-align: left; height: 20px; width: 175px;">
                <asp:LinkButton ID="LnkAgregarRemito" runat="server" TabIndex="10">Agregar</asp:LinkButton>
                    /
                    <asp:LinkButton ID="LnkMasInfo" runat="server" CssClass="campolnk">Mas Informacion</asp:LinkButton></td>
            </tr>
        </table>
        <asp:GridView ID="GridRemito" runat="server" AutoGenerateColumns="False" Width="744px" BackColor="White" BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px" CellPadding="4" ForeColor="Black" GridLines="Horizontal" CellSpacing="1" CssClass="tabla">
                    <Columns>
                        <asp:TemplateField HeaderText="Remito">
                            <ItemTemplate>
                                <asp:Label ID="LblNumeroRemito" runat="server" Text='<%# Bind("Numero") %>'></asp:Label>
                                <asp:HiddenField ID="HFIdRemito" runat="server" Value='<%# Bind("CodigoRemito") %>' />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Fecha">
                            <ItemTemplate>
                                <asp:Label ID="LblFecha" runat="server" Text='<%# Bind("Fecha") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                <asp:TemplateField HeaderText="SubTotal">
                    <ItemTemplate>
                        <asp:Label ID="LblSubTotalRemito" runat="server" Text='<%# Bind("SubTotal") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="IVA">
                    <ItemTemplate>
                        <asp:Label ID="LblIVARemito" runat="server" Text='<%# Bind("Iva") %>'></asp:Label>
                    </ItemTemplate>
                    </asp:TemplateField>                        
                        
                        <asp:TemplateField HeaderText="Valor Cotizado">
                            <ItemTemplate>
                                <asp:Label ID="LblValorCotizado" runat="server" Text='<%# Bind("Valor") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField>
                            <ItemTemplate>
                                <asp:LinkButton ID="LnkRemover" runat="server" CommandName="Remover">Remover</asp:LinkButton>
                                /
                                <asp:LinkButton ID="LnkMasInformacion" runat="server" CommandName="MasInformacion">Mas Informacion</asp:LinkButton>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                    <FooterStyle BackColor="#CCCC99" ForeColor="Black" />
                    <RowStyle HorizontalAlign="Center" />
                    <SelectedRowStyle BackColor="#CC3333" Font-Bold="True" ForeColor="White" />
                    <PagerStyle BackColor="White" ForeColor="Black" HorizontalAlign="Right" />
                    <HeaderStyle BackColor="#333333" Font-Bold="True" ForeColor="White" HorizontalAlign="Center" />
                </asp:GridView>
<asp:Label ID="Label2" runat="server" Text="Concepto a Facturar" Width="100%" style="font-weight: bold; font-size: 14px; vertical-align: middle; font-family: Calibri; background-color: #ff3333; text-align: center" Height="17px"></asp:Label>        
<table class="tabla" style="width: 555px">
    <tr>
        <td style="width: 72px; height: 20px;" >
            <asp:Label ID="Label7" runat="server" Font-Bold="True" Text="Concepto :"></asp:Label></td>
        <td style="width: 285px; text-align: left; height: 20px;" >
            <asp:DropDownList ID="CboConceptos" runat="server" AutoPostBack="True" CssClass="campotxt"
                Width="276px" AppendDataBoundItems="True">
            </asp:DropDownList></td>
        <td style="width: 43px; height: 20px;" align="left" >
            <asp:Label ID="Label8" runat="server" Font-Bold="True" Text="Total :"></asp:Label></td>
        <td style="width: 74px; height: 20px;" align="left" >
            <asp:TextBox ID="TxtTotal" runat="server" CssClass="campotxt" Width="68px" MaxLength="9" ValidationGroup="Concepto"></asp:TextBox></td>
        <td style="width: 61px; height: 20px;" >
            <asp:LinkButton ID="LnkAgregarConcepto" runat="server" TabIndex="10" ValidationGroup="Concepto">Agregar</asp:LinkButton></td>
    </tr>
</table>
        <asp:RangeValidator ID="RvTotal" runat="server" ControlToValidate="TxtTotal" CssClass="campotxt"
            Display="Dynamic" ErrorMessage="RangeValidator" MaximumValue="999999,99" MinimumValue="0,01"
            Type="Double" ValidationGroup="Concepto">Error, Valor Incorrecto. Rango : 0,01 - 999999,99</asp:RangeValidator><asp:GridView ID="GridConcepto" runat="server" AutoGenerateColumns="False" Width="744px" BackColor="White" BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px" CellPadding="4" ForeColor="Black" GridLines="Horizontal" CellSpacing="1" CssClass="tabla">
            <FooterStyle BackColor="#CCCC99" ForeColor="Black" />
            <Columns>
                <asp:TemplateField HeaderText="Concepto">
                    <ItemTemplate>
                        <asp:Label ID="LblConcepto" runat="server" Text='<%# Bind("DescripcionConcepto") %>'></asp:Label>
                        <asp:HiddenField ID="HFIdConcepto" runat="server" Value='<%# Bind("CodigoConcepto") %>' />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="SubTotal">
                    <ItemTemplate>
                        <asp:Label ID="LblSubTotal" runat="server" Text='<%# Bind("SubTotal") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="IVA">
                    <ItemTemplate>
                        <asp:Label ID="LblIVA" runat="server" Text='<%# Bind("Iva") %>'></asp:Label>
                    </ItemTemplate>
                  
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Total">
                    <ItemTemplate>
                        <asp:Label ID="LblTotal" runat="server" Text='<%# Bind("Total") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <ItemTemplate>
                        <asp:LinkButton ID="LnkRemover" runat="server" CommandName="Remover">Remover</asp:LinkButton>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
            <RowStyle HorizontalAlign="Center" />
            <SelectedRowStyle BackColor="#CC3333" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="White" ForeColor="Black" HorizontalAlign="Right" />
            <HeaderStyle BackColor="#333333" Font-Bold="True" ForeColor="White" HorizontalAlign="Center" />
        </asp:GridView>
<asp:Label ID="LblError" runat="server" Width="100%" Font-Bold="True" Font-Names="Calibri" Font-Overline="False" Font-Size="13px" Font-Strikeout="False" Font-Underline="False" ForeColor="Red" style="text-align: center"></asp:Label><br />        
        <asp:Panel ID="Panel5" runat="server" Height="34px" Style="width: 100%; background-color: transparent;
            text-align: right" Width="125px">
            <br />
            <asp:Label ID="Label9" runat="server" Font-Bold="True" Text="SubTotal :" CssClass="tabla"></asp:Label>
                <asp:Label ID="LblSubtotal" runat="server" Font-Bold="True" ForeColor="Red" Text="0,00" CssClass="tabla"></asp:Label>
            &nbsp; &nbsp;<asp:Label ID="Label10" runat="server" Font-Bold="True" Text="IVA :" CssClass="tabla"></asp:Label>
            <asp:Label ID="LblIva" runat="server" Font-Bold="True" ForeColor="Red" Text="0,00" CssClass="tabla"></asp:Label>
            &nbsp; &nbsp;<asp:Label ID="Label5" runat="server" Font-Bold="True" Text="Total :" CssClass="tabla"></asp:Label>
                <asp:Label ID="LblTotal" runat="server" Font-Bold="True" ForeColor="Red" Text="0,00" CssClass="tabla"></asp:Label>
            <br />
            <asp:LinkButton ID="LnkGuardar" runat="server" TabIndex="11" CssClass="tabla" ValidationGroup="Factura">Guardar</asp:LinkButton> / <asp:LinkButton ID="LinkCancelar" runat="server" TabIndex="13" CssClass="tabla">Cancelar</asp:LinkButton>
    <br />                

        </asp:Panel>
    </asp:Panel>

</asp:Content>
